{extend name="base/main" /}
{block name="body"}


<a href="{:url('Navigation/add')}" class="layui-btn">新建固定跳转导航</a>
 <a href="{:url('Navigation/save')}" class="layui-btn">新建自定义跳转导航</a>
<div class="layui-form">

  <table class="layui-table">
    <colgroup>
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
      <tr>
      <th>编号</th>
        <th>导航名称</th>
        <th>列表模式</th>
        <th>导航类型</th>
        <th>图标</th>
        <th>排序</th>
        <th>一级分类名称</th>
        <th>数量</th>
        <th>是否显示</th>
        <th>创建时间</th>
        <th>操作</th>
      </tr> 
    </thead>
    <tbody>
      <?php foreach ($list as $k => $v) { ?>
        <tr>
          <td>{$v.id}</td>
          <td>{$v.dname}</td>
          <td>{$v.index}</td>
          <td>{$v.type}</td>
          <td><img src="{$v.img}" alt="" width="130" height="80"></td>
          <td>{$v.age}</td>
          <td>{$v.yname}</td>
          <td>{$v.sum}</td>
         <td>
            <?php if($v['status'] == 1){ ?>
              <i class="layui-icon layui-icon-ok"></i>
            <?php }else{ ?>
              <i class="layui-icon layui-icon-close"></i>
            <?php } ?>
          </td>
          <td>{$v.addtime}</td>
          <td><a href="{:url('Navigation/update',['id'=>$v['id']])}" class="layui-btn layui-btn-xs">编辑</a>
              <a href="{:url('Navigation/delete',['id'=>$v['id']])}" onclick="return confirm('确定要删除这条数据吗？');" class="layui-btn layui-btn-xs">删除</a>
          </td>
        </tr>
      <?php } ?>
    </tbody>
  </table>
</div>


{/block}